package com.qijian.business.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;

/**
 * 实开发票对象 finance_invoice
 *
 * @author qijian
 * @date 2021-09-15
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("finance_invoice")
public class Invoice extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "唯一id")
    private Long id;

    /**
     * 销售订单id
     */
    @Excel(name = "销售订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "销售订单id")
    private Long contractSalesId;

    /**
     * 发票金额
     */
    @Excel(name = "发票金额")
    @ApiModelProperty(value = "发票金额")
    private BigDecimal amount;

    /**
     * 开票时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开票时间")
    private Date invoiceTime;

    /**
     * 税率
     */
    @Excel(name = "税率")
    @ApiModelProperty(value = "税率")
    private BigDecimal taxRate;

    /**
     * 比率
     */
    @Excel(name = "比率")
    @ApiModelProperty(value = "比率")
    private BigDecimal rate;

    /**
     * 发票号
     */
    @Excel(name = "发票号")
    @ApiModelProperty(value = "发票号")
    private String invoiceNumber;

    /**
     * 发票类型
     */
    @Excel(name = "发票类型")
    @ApiModelProperty(value = "发票类型")
    private Integer invoiceType;

    /**
     * 开票人id
     */
    @Excel(name = "开票人id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "开票人id")
    private Long invoiceUserId;

    /**
     * 开票人名称
     */
    @Excel(name = "开票人名称")
    @ApiModelProperty(value = "开票人名称")
    private String invoiceUserName;

    /**
     * 收货联系人id
     */
    @Excel(name = "收货联系人id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "收货联系人id")
    private Long deliveryContactId;

    /**
     * 收货联系人名称
     */
    @Excel(name = "收货联系人名称")
    @ApiModelProperty(value = "收货联系人名称")
    private String deliveryContactName;

    /**
     * 收货联系人固话
     */
    @Excel(name = "收货联系人固话")
    @ApiModelProperty(value = "收货联系人固话")
    private String deliveryContactPhone;

    /**
     * 收货省份
     */
    @ApiModelProperty(value = "收货地区")
    private String deliveryRegion;

    /**
     * 收货详细地址
     */
    @Excel(name = "收货详细地址")
    @ApiModelProperty(value = "收货详细地址")
    private String deliveryAddress;

    @ApiModelProperty(value = "开票方式")
    private Integer deliveryType;

    @ApiModelProperty(value = "发货备注")
    private String deliveryRemark;
}
